<?php 
    if($query->num_rows() > 0){
        $profile_data = $query->row();
        
    }
?>
<!--register Form-->


<form id="changeprofile" method="post" action="<?php echo site_url('home/change_user_profile')?>">
    
    <table border=0 align="center">
        <tr>
            <td width="30%">Firstname :</td>
            <td width="20%"><input type="text" name="firstnamec" value="<?php echo $profile_data->first_name?>"/></td>
            <td width="50%"><?php echo form_error('firstnamec'); ?></td>

        </tr>
        <tr>
            <td width="30%">Lastname :
            <td width="20%"><input type="text" name="lastnamec" value="<?php echo $profile_data->last_name?>"/></td>
            <td width="50%"><?php echo form_error('lastnamec'); ?></td>
        </tr>
        <tr>
            <td width="30%">Email :</td>
            <td width="20%"><input type="text" name="email" value="<?php echo $profile_data->email?>"/></td>
            <td width="50%"><?php echo form_error('email'); ?></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input name="change" id="change" type="submit" value="Change information"/><br/><br/>
            </td>
        </tr>
     </table>              
</form>
